package com.hyny.framework.platform.system.utils.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * Result返回的状态码
 */
@Getter
@AllArgsConstructor
public enum ResultEnum {
    SUCCESS("10000", "成功"),
    ERROR("10500", "错误"),
    AUTH_FAIL("10400", "不允许访问"),
    UNAUTHENTICATED("10401", "身份认证失败"),
    // token异常
    TOKEN_PAST("10402", "身份过期，请求重新登录！"),
    TOKEN_ERROR("10403", "令牌错误"),
    HEADEA_ERROR("10404", "请求头错误"),
    AUTH_USERNAME_NONE("10405", "用户名不能为空"),
    AUTH_PASSWORD_NONE("10406", "密码不能为空"),
    AUTH_USERNAME_ERROR("10407", "用户名不存在"),
    AUTH_PASSWORD_ERROR("10408", "密码错误"),
    PARAM_ERRROR("10501", "参数异常"),
    MENU_NO("10301", "没此权限，请联系管理员！")


    ;
    private String code;
    private String msg;

    @Override
    public String toString() {
        return this.name()+":"+this.msg+"\n";
    }
}
